{* $Id$ *}
{include_core file="admin/lib/header.html" title="订单简报"}
<div class="page-header border-bottom clearfix">
    <h2 class="left">订单简报<span>在这里查看订单的简报信息并导出</span></h2>
    <a href="{get_url()}&is_excel=1" class="btn btn-success btn-sm right">导出EXCEL</a>
</div>
<div class="search-form js_advancedForm">
    <form action="bulletin/admin/order_bulletin" method="get" class="js_focusSearchForm">
        <p>
            <label for="" class="search-f-label">添加时间：</label>
            <input type="text" class="search-f-ipt1 search-f-ipt2" name="search_filter[start_date]"
                   value="{$search_filter.start_date}" id="startDate">
            <span class="search-f-line"></span>
            <input type="text" class="search-f-ipt1 search-f-ipt2" name="search_filter[end_date]"
                   value="{$search_filter.end_date}" id="stopDate">
        </p>
        <p><label for="" class="search-f-label"></label>
            <button type="submit" class="btn btn-success btn-xs js_searchBtn">搜索</button>
        </p>
    </form>
</div>
{include_core file="admin/lib/pager.html"}
<table class="list-table">
    <thead>
    <tr>
        <th style="text-align:center;min-width:100px;" rowspan="2">日期</th>
        <th colspan="7">合伙人端</th>
        <th colspan="3">掌柜端</th>
    </tr>
    <tr>
        <th style="text-align:center;min-width:60px;">订单总数</th>
        <th style="text-align:center;min-width:60px;">当日新增</th>
        <th style="text-align:center;min-width:60px;">待收款(总)</th>
        <th style="text-align:center;min-width:60px;">待配送(总)</th>
        <th style="text-align:center;min-width:60px;">配送中(总)</th>
        <th style="text-align:center;min-width:60px;">配送完成(总)</th>
        <th style="text-align:center;min-width:60px;">撤销(总)</th>
        <th style="text-align:center;min-width:60px;">订单总数</th>
        <th style="text-align:center;min-width:60px;">当日订单</th>
        <th style="text-align:center;min-width:60px;">撤销(总)</th>
    </tr>
    </thead>
    <tbody>
    {foreach $relation_info as $k => $v}
    <tr>
        <td style="text-align:right;">{$v.date}</td>
        <td style="text-align:right;">{$v.partner_order_data.partner_order_num}</td>
        <td style="text-align:right;">{$v.partner_order_data.partner_new_order_num}</td>
        <td style="text-align:right;">{$v.partner_order_data.partner_prepare_pay_order_num}</td>
        <td style="text-align:right;">{$v.partner_order_data.partner_prepare_delivery_order_num}</td>
        <td style="text-align:right;">{$v.partner_order_data.partner_in_delivery_order_num}</td>
        <td style="text-align:right;">{$v.partner_order_data.partner_finish_delivery_order_num}</td>
        <td style="text-align:right;">{$v.partner_order_data.partner_dealer_cancel_order_num}</td>
        <td style="text-align:right;">{$v.manager_order_data.manager_order_num}</td>
        <td style="text-align:right;">{$v.manager_order_data.manager_new_order_num}</td>
        <td style="text-align:right;">{$v.manager_order_data.manager_dealer_cancel_order_num}</td>
    </tr>
    {foreachelse}
    <tr>
        <td>{$v.date}</td>
        <td>{$v.partner_order_data.partner_order_num}</td>
        <td>{$v.partner_order_data.partner_new_order_num}</td>
        <td>{$v.partner_order_data.partner_prepare_pay_order_num}</td>
        <td>{$v.partner_order_data.partner_prepare_delivery_order_num}</td>
        <td>{$v.partner_order_data.partner_in_delivery_order_num}</td>
        <td>{$v.partner_order_data.partner_finish_delivery_order_num}</td>
        <td>{$v.partner_order_data.partner_dealer_cancel_order_num}</td>
        <td>{$v.manager_order_data.manager_order_num}</td>
        <td>{$v.manager_order_data.manager_new_order_num}</td>
        <td>{$v.manager_order_data.manager_dealer_cancel_order_num}</td>
    </tr>
    {/foreach}
    </tbody>
</table>
<script type="text/javascript">
    $(function () {
        // 高级搜索
        $('.js_advanced').click(function (e) {
            e.preventDefault();
            var thisObj = $(this);
            var outBox = thisObj.closest('form');
            if (thisObj.hasClass('js_isOpen')) {
                thisObj.removeClass('js_isOpen open');
                outBox.find('input').show();
                outBox.find('button').show();
                $('.js_advancedForm').hide();
            } else {
                thisObj.addClass('js_isOpen open');
                outBox.find('input').hide();
                outBox.find('button').hide();
                $('.js_advancedForm').show();
            }
        });

    });
</script>
{include_core file="admin/lib/pager.html"}
<!--end:列表-->
{load_js file='zclip/jquery.zclip.min.js'}
{load_js file='zclip/ZeroClipboard.js'}
{include_core file="admin/lib/footer.html"}
